import request from '@/utils/request'

// 获取数据列表
export function getTableList(data) {
  return request({
    url: '/zt/project/info/page?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
    method: 'post',
    data: data
  })
}

// 新增项目
export function addItem(data) {
  return request({
    url: '/zt/project/info/save',
    method: 'post',
    data: data
  })
}

// 获取项目详情
export function getItemDetail(query) {
  return request({
    url: '/zt/project/info/findById',
    method: 'get',
    params: query
  })
}

// 修改项目
export function updateItem(data) {
  return request({
    url: '/zt/project/info/update',
    method: 'put',
    data: data
  })
}

// 删除项目
export function deleteItem(query) {
  return request({
    url: '/zt/project/info/delete',
    method: 'delete',
    params: query
  })
}

//获取生产院
export function findDept() {
  return request({
    url: '/zt/project/info/dept',
    method: 'get',
  })
}

export function deptTreeSelect() {
  return request({
    url: '/zt/project/info/deptTree',
    method: 'get'
  })
}
